home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_13_03
/
pjp
/
stringbu.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-01
|
533b
|
19 lines
------------- Listing 2: The file stringbu.c ------------------
// stringbuf -- stringbuf basic members
#include <<sstream>>
stringbuf::~stringbuf()
{ // destruct a stringbuf
}
strstreambuf::_Strstate stringbuf::_Mode(ios::openmode which)
{ // map ios::openmode to _Strstate
_Strstate mode = _Dynamic;
if (!(which & ios::in))
mode |= _Noread;
if (!(which & ios::out))
mode |= _Constant;
return (mode);
}